<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>对象简介</title>
  </head>
  <body>
    <script type="text/javascript">
      // const arr=['王二',35,'男','180'];

      const person = {
        name: "zhangsan",
        age: 30,
        sex: "男",
        favor: ["阅读", "羽毛球"],
        sayHi: function () {
          console.log("哈哈哈哈");
        },
      };

      console.log(person.sayHi());

      var obj1 = new Object();
      obj1.test = undefined;

      var obj2 = new Object();
      obj2.name = "张三";
      obj1.test = obj2;
      console.log(obj1.test.name);

      var obj11 = new Object();
      obj11.name = "孙悟空";

      var obj22 = obj11;
      obj22.name = "猪八戒";
      console.log(obj11.name);
    </script>
  </body>
</html>
